void usleep(long usec)
{
        LARGE_INTEGER freq;
        LARGE_INTEGER start,end;
        QueryPerformanceFrequery(&freq);
        double count = usec * freq.QuadPart * 0.0000001;
        QueryPerfornaceCounter(&start);
        count += start.QuadPart;
        do
        {
            QueryPerformanceCounter(&end);
        }while(end.QuadPart < count);
}